package com.xuecheng.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.base.model.RestResponse;
import com.xuecheng.content.model.dto.CoursePreviewDto;
import com.xuecheng.content.model.po.CoursePublish;

import java.io.File;

public interface CoursePublishService extends IService<CoursePublish> {
    /**
     * 获取课程预览信息
     * @param courseId
     */
    CoursePreviewDto getCoursePreviewDto(Long courseId);

    /**
     * 课程提交审核
     * @param companyId
     * @param courseId
     * @return
     */
    RestResponse<String> courseCommitAudit(Long companyId, Long courseId);

    /**
     * 课程审核功能
     * @param courseId
     * @param pass
     * @return
     */
    RestResponse<Boolean> courseAudit(Long courseId, boolean pass);

    /**
     * 课程发布功能
     * @param companyId
     * @param courseId
     * @return
     */
    RestResponse<Boolean> coursePublish(Long companyId, Long courseId);

    /**
     * 课程静态化
     * @param courseId
     * @return
     */
    File generateCourseHtml(Long courseId);

    /**
     * 上传课程静态化页面
     * @param courseId
     * @param file
     */
    void uploadCourseHtml(Long courseId,File file);

    /**
     * 根据id查询课程发布信息
     * @param courseId
     * @return
     */
    CoursePublish getCoursePublishById(Long courseId);
}
